<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class SecondHandHouse extends Model
{
    use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'second_hand_house';
    public $dateFormat = 'U';
    protected $guarded = ['uid'];


    public function agent()
    {
        return $this->belongsTo('App\Models\Agent','agent_id');
    }

    public function houseType()
    {
        return $this->belongsTo('App\Models\FangAttrs','house_type');
    }

    public function fitUp()
    {
        return $this->belongsTo('App\Models\FangAttrs','fit_up');
    }

    public function forward()
    {
        return $this->belongsTo('App\Models\FangAttrs','forward');
    }

}
